import request from '../../router/axios.js'

export function checkFetchList(obj) {
  return request({
    url: '/eims/check/page',
    method: 'get',
    params: obj
  })
}

// 新增盘点表
export function saveNewCheckOrder(obj) {
  return request({
    url: '/eims/check/save',
    method: 'post',
    data: obj
  })
}

// 修改盘点表
export function updateCheckInfo(obj) {
  return request({
    url: '/eims/check',
    method: 'put',
    data: obj
  })
}

// 审核并保存
export function saveAndAuditOrder(obj) {
  return request({
    url: '/eims/check/addAndAudit',
    method: 'post',
    data: obj
  })
}

// 删除库存盘点表
export function delCheckOrder(id) {
  return request({
    url: '/eims/check/' + id,
    method: 'delete'
  })
}

// 获取仓位信息列表
export function getStockDataList(obj) {
  return request({
    url: '/eims/stock/page',
    method: 'get',
    params: obj
  })
}

// 获取商品类型列表
export function getCtgDataList(obj) {
  return request({
    url: '/eims/ctg/page',
    method: 'get',
    params: obj
  })
}

// 根据商品类别ID查找商品列表
export function getGoodsByCtg(obj) {
  return request({
    url: '/eims/storage/page',
    method: 'get',
    params: obj
  })
}

// 根据id审核
export function auditById(id) {
  return request({
    url: '/eims/check/audit/' + id,
    method: 'get'
  })
}

// 根据商品类别ID查找商品列表
export function getCheckGoodsPage(obj) {
  return request({
    url: '/eims/goods/getCheckGoodsPage',
    method: 'get',
    params: obj
  })
}

// 根据id获取盘亏盘盈单信息
export function getInfoById(id) {
  return request({
    url: '/eims/check/getInfo/' + id,
    method: 'get'
  })
}
